<meta title="设置用户级别" args="id,level" width="400"/>
<form class="p" id="form" s="form,valid" method="put" action="/api/user/level/{id}">
    <select class="form-control input-sm" s="select"
            name="level"
            s-data="level"
            s-build="S.get('/api/enum/valuesMap/core.enums.UserLevel')">
        <option value="">会员等级</option>
    </select>
</form>
<script type="text/javascript">
    S.meta.btns = [
        {
            name: "保存",
            style: "btn btn-primary",
            click: function() {
                return $form.submit().done(function(){
                    S.close(true);
                })
            }
        },
        {
            name: "关闭",
            style: "btn btn-default",
            click: function() {
                S.close();
            }
        }
    ]

</script>